/**
 * Created by guosc on 2016/10/25 0025.
 */
define(["angular",
    "framework/utils/JSONPrettyFormat",
    'framework/dataGrid/DataGridModule',
    'framework/pagination/GillionPaginationModule',
    'framework/msg/GillionMsgModule'
],function (angular, JSONPrettyFormat) {
    var CreatePackageModule = angular.module("HolidaysEditModule", [
        'DataGridModule',
        'GillionPaginationModule',
        'GillionMsgModule']);
    CreatePackageModule.controller("HolidaysEditController", function ($scope,Resource,$location,GillionMsg,GillionMsgService) {
        $scope.holidaysModel=GillionMsgService.getInputData();
        $scope.confirm=function(){
            Resource("/grule-manager/holidays").create($scope.holidaysModel,function(response){
                if (response.success) {
                    GillionMsgService.setOutputData(response.data);
                    GillionMsgService.close();
                }
            })
        };
        $scope.cancel=function(){
            GillionMsgService.close();
        }

    });

});